package com.example.computer_exam_training_sys.service;

import com.example.computer_exam_training_sys.entity.DiscussionTopicInfo;

import java.util.List;
import java.util.Map;

public interface DiscussionTopicService {
    int addTopic(DiscussionTopicInfo topic);
    int deleteTopic(Integer topicId);
    DiscussionTopicInfo getTopicById(Integer topicId);
    List<DiscussionTopicInfo> getTopicList();
    List<DiscussionTopicInfo> getTopicListByPage(Integer topicId, int page, int size);
    int countTopics(Integer topicId);
    List<DiscussionTopicInfo> getTopicWithComments(Integer topicId);
    List<Map<String, Object>> getTopicWithCommentsDetails(Integer topicId);
    List<DiscussionTopicInfo> searchTopicsByTopicIdOrTitle(Integer topicId, String title, int page, int size);
    int countSearchTopics(Integer topicId, String title);
    List<DiscussionTopicInfo> getTopicListWithCourseName(Integer topicId, String courseName, String keyword, int page, int size);
    int countTopicsWithCourseName(Integer topicId, String courseName, String keyword);
    List<Map<String, Object>> getTopCourses();
    List<Map<String, Object>> getHotTopics();
    int increaseViewCount(Integer topicId);
}